#define _CRT_SECURE_NO_WARNINGS 1

#include"heap.h"
#undef main
int main()
{
	Heap ph;
	HeapInit(&ph);
	Heap* php = &ph;

	HeapPush(php, 17);
	HeapPush(php, 20);
	HeapPush(php, 10);
	HeapPush(php, 13);
	HeapPush(php, 19);
	HeapPush(php, 15);

	HeapPrint(php);

	HeapPop(php);
	HeapPrint(php);

	HeapPop(php);
	HeapPrint(php);

	HeapPop(php);
	HeapPrint(php);

	int a[5] = { 29,34,23,45,27 };
	HeapSort(a, 5);
	int i = 0;
	while (i < 5)
	{
		printf("%d ", a[i++]);
	}
	return 0;
}